import 'package:seedfour/generated/json/base/json_field.dart';
import 'package:seedfour/generated/json/notice_v2_list_entity.g.dart';
import 'dart:convert';
export 'package:seedfour/generated/json/notice_v2_list_entity.g.dart';

@JsonSerializable()
class NoticeV2ListEntity {
  int? total;
  int? quota;
  List<NoticeV2Data>? data;

  NoticeV2ListEntity();

  factory NoticeV2ListEntity.fromJson(Map<String, dynamic> json) =>
      $NoticeV2ListEntityFromJson(json);

  Map<String, dynamic> toJson() => $NoticeV2ListEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NoticeV2Data {
  int? id;
  String? title;
  late String name = '';
  String? content;
  int? createdAt;
  int? updatedAt;
  String? subjectAmount;
  String? servicePrice;
  int? status;
  String? catalog;
  int? cooperRatio;
  String? receiveName;
  late String receiveUid = '';
  int? receiveTime;
  String? caseId;
  String? caseName;
  int? shareType;
  List<NoticeV2ListDataAttaches>? attaches;
  bool? isRead;

  NoticeV2Data();

  factory NoticeV2Data.fromJson(Map<String, dynamic> json) =>
      $NoticeV2DataFromJson(json);

  Map<String, dynamic> toJson() => $NoticeV2DataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class NoticeV2ListDataAttaches {
  String? name;
  String? url;

  NoticeV2ListDataAttaches();

  factory NoticeV2ListDataAttaches.fromJson(Map<String, dynamic> json) =>
      $NoticeV2ListDataAttachesFromJson(json);

  Map<String, dynamic> toJson() => $NoticeV2ListDataAttachesToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
